package cn.beyond.vehicleManagement.dao;
import cn.beyond.vehicleManagement.pojo.SysUser;
import cn.beyond.vehicleManagement.pojo.VehicleProcurement;
import cn.beyond.vehicleManagement.util.DataBaseUtil;

import java.util.List;
import java.util.Map;

public class VehicleProcurementDao {

    DataBaseUtil<VehicleProcurement> userDao=new DataBaseUtil<>();

    /**
     * 添加采购记录
     * @return
     */
    public int addVehicleProcurement(VehicleProcurement vehicleProcurement){
        return    userDao.addUtil(vehicleProcurement,"vehicle_procurement");
    }

    /**
     * 删除用户
     * @param obj
     * @param column
     * @return
     */
    public int delete(Object obj,String column){
        return userDao.delByIdUtil(obj,"vehicle_procurement",column);

    }

    /**
     * 修改用户

     * @return
     */
    public int update(VehicleProcurement vehicleProcurement){
        return  userDao.updateByidUtil(vehicleProcurement,"vehicle_procurement");
    }

    /**
     * 查询结果返回单条记录
     * @param selectmap
     * @return
     */
    public VehicleProcurement selectUserByOne(VehicleProcurement vehicleProcurement, Map<String, Object> selectmap){
        return userDao.selectONE(vehicleProcurement,"vehicle_procurement",selectmap);
    }

    /**
     * 查询结果返回多条记录
     * @param selectmap
     * @return
     */
    public List<VehicleProcurement> selectUserByCondition(VehicleProcurement vehicleProcurement, Map<String,
            Object> selectmap){
        return  userDao.selectAll(vehicleProcurement,"vehicle_procurement",selectmap);
    }
}
